/*
 * $Id: HibernateUtilTestCase.java 27 2007-04-13 01:02:48Z aaron.day $
 */
package org.crazydays.hibernate;


import java.util.*;

import org.hibernate.cfg.*;

import junit.framework.TestCase;

/**
 * HibernateUtilTestCase
 */
public class HibernateUtilTestCase
	extends TestCase
{
	/**
	 * Load class.
	 */
	public void test()
	{
		try {
			Class clazz = Class
					.forName("org.crazydays.hibernate.HibernateUtil");
			assertNotNull("clazz == null", clazz);
		} catch (ClassNotFoundException e) {
			fail("ClassNotFoundExcetion: " + e.getMessage());
		}
	}

	/**
	 * Test AnnotationConfiguration.
	 */
	public void testAnnotationConfiguration()
	{
		System.out.println("testAnnotationConfiguration()");
		Configuration cfg = new AnnotationConfiguration().configure();

		Iterator mappings = cfg.getTableMappings();
		while (mappings.hasNext()) {
			Object o = mappings.next();
			System.out.println("mapping " + o.getClass().getName());
		}
	}
}
